* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --borderColor:#fff; 
}

body {
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
    font-family: sans-serif;
}

#bgcanvas {
    position: absolute;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    z-index: -1;
}

#wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(90deg, rgba(68, 68, 237, 0.733) 23%, rgba(167, 9, 167, 0.7) 80%);
}

#GameArea {
    display: none;
    width: 95%;
    max-width: 500px;
    height: 95vh;
    max-height: 900px;
    touch-action: none;
    flex-direction: row;
    align-items: stretch;
}

#gameCanvas {
    border: 2px solid var(--borderColor);
    margin: 0 5px 0 0;
    flex-grow: 1;
    height: 100%;
    width: 70%;
}

#SLN {
    display: flex;
    width: 30%;
    border: 2px solid var(--borderColor);
    flex-direction: column;
    justify-content: space-around;
    padding: 10px;
}

#SLN > div {
    border-bottom: 2px solid var(--borderColor);
    padding-bottom: 10px;
    text-align: center;
}

#SLN > div:last-child {
    border-bottom: none;
}


#SCORE,
#Level,
#NEXT {
    color: black;
    font-size: 1.5em;
    font-weight: 600;
}

#NEXT canvas {
    width: 80%;
    max-width: 100px;
    margin-top: 10px;
}

#sc,
#lv {
    margin-top: 6px;
    font-size: 1.2em;
}

#play-pause {
    display: none;
}

#play-pause:checked + #play-pause-label::after {
    content: "►";
}

#play-pause-label::after {
    content: "❙❙";
    letter-spacing: -14px;
    margin-left: -14px;
}

#play-pause-label,
button,
#Sound,
#MusicNote {
    cursor: pointer;
}

#pauseResume {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    flex-direction: column;
}

#iconL {
    font-weight: 600;
    font-size: 0.8em;
}

#Lsc,
#Ln,
#Ll,
#Li,
#sc,
#lv,
#play-pause,
#iconL,
#menu,
#message {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -o-user-select: none;
}

#menu {
    display: flex;
    background: linear-gradient(90deg, rgba(68, 68, 237, 0.733) 23%, rgba(167, 9, 167, 0.7) 80%);
    position: absolute;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    flex-direction: column;
    top: 0;
    left: 0;
}

#menu h3 {
    display: none;
    font-size: 2.5em;
    margin: 16px 0 11px 0;
    background-color: rebeccapurple;
    border-radius: 30px;
    color: rgb(37, 228, 148);
    text-align: center;
    font-weight: 800;
    padding: 10px 20px;
}

#displayScore {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2em;
}

#highScore {
    display: none;
    font-size: 0.8em;
    font-family: monospace;
    margin: 17px 0 0 0;
}

#playwrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#menu button {
    display: inline-block;
    border-radius: 60px;
    color: black;
    padding: .75rem 1.25rem;
    border: 2px solid #36f47f;
    letter-spacing: .10rem;
    min-width: max-content;
    transition: all 300ms;
    position: relative;
    background-color: transparent;
    overflow: hidden;
    z-index: 1;
    font-size: 1.5em;
    margin: 20px;
}

#menu button:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10rem;
    z-index: -3;
}

#menu button:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #36f47f;
    transition: all 300ms;
    border-radius: 9rem;
    z-index: -2;
}

#menu button:hover {
    color: white;
}

#menu button:hover:before {
    width: 100%;
}

#menu button:active {
    transform: translate(2px, -2px);
}

#start {
    font-size: 2em;
}

#newGame, #resume {
    font-size: 1.5em;
    display: none;
}


#Music {
    display: flex;
    justify-content: center;
    margin-top: 45px
}

#loading {
    position: absolute;
    display: flex;
    background: linear-gradient(90deg, rgba(68, 68, 237) 23%, rgba(167, 9, 167) 80%);
    height: 100vh;
    width: 100vw;
    justify-content: center;
    align-items: center;
    z-index: 10;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

#logo {
    width: 100px;
    height: 100px;
}

#loadingimg {
    width: 150px;
    height: 400px;
}

@-webkit-keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.fadeOut {
    -webkit-animation-name: fadeOut;
    animation-name: fadeOut;
}
